import request from '@/utils/request'

// 获取部门架构接口
export function departmentAPI() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 获取部门负责人接口
export function responsibleAPI() {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}
// 新增部门接口
export function addDepAPI(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 获取部门详情接口
export function findDepAPI(id) {
  return request({
    url: '/company/department/' + id,
    method: 'get'
  })
}
// 修改部门接口
export function editDepAPI(data, id) {
  return request({
    url: '/company/department/' + id,
    method: 'put',
    data
  })
}
// 删除部门接口
export function delDepAPI(id) {
  return request({
    url: '/company/department/' + id,
    method: 'delete'
  })
}
